//
//  SearchFooterCollectionViewCell.m
//  EggSteward
//
//  Created by 王道林 on 16/9/9.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import "SearchFooterCollectionViewCell.h"
#import "BaseLabel.h"
#import "Masonry.h"
@interface SearchFooterCollectionViewCell ()

@end
@implementation SearchFooterCollectionViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView
{
    _label = [[BaseLabel alloc] init];
    _label.font = [UIFont systemFontOfSize:15];
    _label.textColor = [UIColor grayColor];
//    _label.numberOfLines = 0;
    _label.textAlignment = 1;
    _label.layer.masksToBounds = YES;
    _label.layer.borderWidth = 1;
    _label.layer.cornerRadius = 2;
    _label.layer.borderColor = [[UIColor grayColor] CGColor];
    [self.contentView addSubview:_label];
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    [_label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.contentView.mas_top).mas_offset(0);
        make.left.mas_equalTo(self.contentView.mas_left).mas_offset(0);
        make.bottom.mas_equalTo(self.contentView.mas_bottom).mas_offset(-0);
        make.right.mas_equalTo(self.contentView.mas_right).mas_offset(-0);
    }];
}

@end
